/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package pku.lbs.web.servlet;

import java.io.IOException;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import pku.lbs.web.VoiceWeb;

/**
 *
 * @author yongchao
 */
public class VoiceServlet extends BaseServlet {

    private enum ActionEnum {
        BROADCAST
    }

    @Override
    protected String processAction(String action, HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
        String jsonStr = null;
        VoiceWeb webBean = VoiceWeb.getInstance();
        switch (ActionEnum.valueOf(action)) {
            case BROADCAST:
                jsonStr = webBean.doBroadcast(request, response);
                break;
        }
        return jsonStr;
    }
}
